package generateDBModelUtill

import (
	"go-admin-api/utills/generateDBModelUtill/db_context"
	"go-admin-api/utills/generateDBModelUtill/engine"
	"log"
)
import "os"

//初始化
func Init(){
	//初始化Mysql连接池
	mysql := db_context.GetMysqlInstance().InitMysqlPool()
	if !mysql {
		log.Println("init database pool failure...")
		os.Exit(1)
	}
}

func StartGoGenertateAllTables()  {
	//初始化数据库
	Init()
	engine.Genertate() //生成所有表信息
	//engine.Genertate("admin_info","video_info") //生成指定表信息，可变参数可传入多个表名
}
